﻿/**************************************************************
 * Description:
 * PRChangeDocBListUIModelAction.cs
 * Product: U9
 * Co.    : UFIDA Group
 * Author : Auto Generated
 * version: 2.0
 **************************************************************/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using UFSoft.UBF.Util.Log;
using UFSoft.UBF.UI.MD.Runtime;
using UFSoft.UBF.UI.ActionProcess;
using UFSoft.UBF.UI.IView; 
using System.Data;
using UFIDA.UBF.Query.CommonService;
using UFSoft.UBF.UI.FormProcess;
using UFSoft.UBF.UI.ControlModel;
using UFIDA.UBF.Query.CommonService.QueryStrategy;
using UFIDA.UBF.Query.CaseModel;
using UFIDA.U9.UI.PDHelper;
using UFSoft.UBF.ExportService;

namespace PRChangeDocBListUIModel
{
	public partial class PRChangeDocBListUIModelAction : BaseAction
	{
		private static readonly ILogger logger = LoggerManager.GetLogger(typeof(PRChangeDocBListUIModelAction));
		//强类型化基类Model属性.
		public new PRChangeDocBListUIModelModel CurrentModel 
		{
			get {
				return (PRChangeDocBListUIModelModel)base.CurrentModel;
			}
			set {
				base.CurrentModel = value ;
			}
		}
		
		public PRChangeDocBListUIModelAction(IPart part) : base(part)
		{
		}
		//Model参数的构造,用于测试用例.
		public PRChangeDocBListUIModelAction(PRChangeDocBListUIModelModel model) : base(model)
		{
		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnLookCase(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnLookCase_Extend);
		}
		private void OnLookCase_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	 
			//加入{action.Name}的代码模版:.\UITpls\UICommonAction.tpl,参数:QryClick
            UFIDA.U9.UI.Commands.CommandFactory.DoCommand("QryClick",this,sender,e);

	  
		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnCaseChanged(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnCaseChanged_Extend);
		}
		private void OnCaseChanged_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	        QryService.OnCaseChangedDefault("DDLCase", this.CurrentPart);
		QueryAdjust();
	 

		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnOutPut(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnOutPut_Extend);
		}
		private void OnOutPut_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	 
			//加入{action.Name}的代码模版:.\UITpls\UICommonAction.tpl,参数:OnOutPut
            UFIDA.U9.UI.Commands.CommandFactory.DoCommand("OnOutPut",this,sender,e);

	  
		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnGridRowDbClick(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnGridRowDbClick_Extend);
		}
		private void OnGridRowDbClick_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	 

		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnNew(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnNew_Extend);
		}
		private void OnNew_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	 

		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnPrint(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnPrint_Extend);
		}
		private void OnPrint_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	 
			//加入{action.Name}的代码模版:.\UITpls\UICommonAction.tpl,参数:OnPrint
            UFIDA.U9.UI.Commands.CommandFactory.DoCommand("OnPrint",this,sender,e);

	  
		}
		/// <summary>
		/// Help: 
		/// </summary>
		public void OnDelete(object sender, UIActionEventArgs e)
		{
			//调用基类委托..
			this.InvokeAction(sender,e,this.OnDelete_Extend);
		}
		private void OnDelete_DefaultImpl(object sender, UIActionEventArgs e)
		{
	  
	 
			//加入{action.Name}的代码模版:.\UITpls\UICommonAction.tpl,参数:ListDeleteClick
            UFIDA.U9.UI.Commands.CommandFactory.DoCommand("ListDeleteClick",this,sender,e);

	  
		}
		#region Action的内置两个Action.
		/// <summary>
		/// Help: 数据加载(发生在Form的初始化加载时)
		/// </summary>
		public void OnLoadData(object sender, UIActionEventArgs e)
		{
			//UBF扩展处...
			this.OnLoadData_Extend(sender,e) ;
		}
		private void OnLoadData_DefaultImpl(object sender, UIActionEventArgs e)
		{
		   
		     InitCaseModel();
				}
		/// <summary>
		/// Help: 数据收集(发生在Form的CallBack或者是PostBack时)
		/// </summary>
		public void OnDataCollect(object sender, UIActionEventArgs e)
		{
			//UBF扩展处...
			this.OnDataCollect_Extend(sender,e) ;
		}
		private void OnDataCollect_DefaultImpl(object sender, UIActionEventArgs e)
		{
		    UFIDA.U9.UI.Commands.CommandFactory.DoCommand("DataCollect",this,sender,e);
		}
		#endregion
         

            
        #region BE列表自动产生的代码
        
		public void QueryAdjust()
		{
			IUFDataGrid UIGrid = this.CurrentPart.GetUFControlByName(this.CurrentPart.TopLevelContainer, "DataGrid1") as IUFDataGrid;

			BEQueryStrategyImpl beQryStrategyImpl = new BEQueryStrategyImpl(this.CurrentState, "UFIDA.U9.Cust.OTD.ZF.SHXM3003.OTDBE.PRChangeBE.PRChangeDoc", "a78d58cf-1f33-42a2-a045-1b1527576ad5", UIGrid.UIView, UIGrid, 1);

			beQryStrategyImpl.Adjust();
		    
			AfterQryAdjust_Extend(UIGrid);

			UIGrid.UIView.CurrentFilter.OPath = CustomFilterOpath_Extend(QryService.GetDefaultOpath((BaseWebForm)(this.CurrentPart)));
			UIGrid.UIView.CurrentFilter.OrderBy = QryService.GetOrderByOpath((BaseWebForm)(this.CurrentPart));

			UIGrid.UIView.Clear();
			this.NavigateAction.FirstPage(null);

			//20090316 UBF2.9_查询_yzx_修改查询设计器的tpl_用于显示多webpart查询的IE状态栏提示信息
			QryService.ShowQueryInfoInIEStatusBar((BaseWebForm)this.CurrentPart, UIGrid.UIView);
		}

		public void InitCaseModel()
		{
			QryService.ClearSession((UFSoft.UBF.UI.FormProcess.BaseWebForm)(this.CurrentPart));
			IUFDataGrid UIGrid = this.CurrentPart.GetUFControlByName(this.CurrentPart.TopLevelContainer, "DataGrid1") as IUFDataGrid;
			BEQueryStrategyImpl beQryStrategyImpl = new BEQueryStrategyImpl(this.CurrentState, "UFIDA.U9.Cust.OTD.ZF.SHXM3003.OTDBE.PRChangeBE.PRChangeDoc", "a78d58cf-1f33-42a2-a045-1b1527576ad5", UIGrid.UIView, UIGrid, 1);
			beQryStrategyImpl.QueryComponentXMLCompressed = @"zVXNbhxFEDYXLkg8w2ruvZ7+n5a8juLdWKzkxIu9thC36u5qe8nszGp2NrFv4QRCQjmhIOXKgQvi
gJVI5mmQsAlPAT27WWxvcJRIHOjLdFV11Vf1ddX02gdra2t/xdV8m/Vhs/nt4407J+O89Qir6ags
Ogltp0kLC1f6UXHUSWZ1IFlyZ3Pj0xlWp91yPCkLLOrWyHcSJkLQXgjiqaRE2EwSI1NDjMlQeeaF
CjRpFTDGTjLY6x5DcYS90u2MpnXS8qPpJIfTB7dYceqq0aSep5S0jjGfNN95EsPTSXRZnJsrDvb6
nQR05mXmAqGBcyIYMAKpkIRaKpmWWoGXr8/vl7PK4fYszxfoB9v93t32gWl3Z9O6vTvstT/fbu9/
8tl9nqa8kbfutZcZXtvGZJPWQf9whI97FRwt0mp2vfJxkbT2MPSLUO6U4BemLrhjTDY3tmA6co1p
TiIaYS23iqBNLREpRZKhccQzqljmhNNglySusHYrTRF6WD7EuW6vLOtePNYtixpP6kPIZ3PX7VFe
YzUEeziajmwedcNqhkmrW+azcfGmfr+s6je1iyj3TiZQ+B18hHkn4csYq9omwqpuPdIxeM3UnA6g
zDtvBMm0QiLQIwGfpUR4JaSizkgV3peOQVV+ga7u964JA6iPG3Fr0K9xvDBtDXYnWEHjvlD0hrtL
y92j2PW9PL8mxUgnp40cizjoXy+CgtLUQiAoeSBCGUsyyS2hnFkdpyIApf9lEQf9+6XHfFmJYiL1
sW0IKAFEaBk5tFwS5jjjwUmRoWyctstqvPThRphUpZJoQzUREOL4aBqvgRserBHagboCahycDZaZ
GDqTEUQoTgyznGju0TPGuLfpnJoeBpjldRemeCXMG2S6ubHYLG5ep5IzcIRZF/8mzKYEqHKEMh7n
0BvQmi9J61YINfrdYoW9i6+fX/x6fvnsxZ/Pzm5lcv0GrEC0Bq0lQRsW2yylxIp4a95TGsBmTut0
BXbr9F9hfz8/f0dMCVL4jCsiqIwzbz0Qq7QjOlDnFJOQZv/MfPzLPChX8F79/PLV2U8XT7+/fH52
8e13F09fviMwcynjJpIaMSMwZPH6WBAkNidDJZXlCpbA+zXUs+kK8h/fvLh88uU7oimVUeMtRIz4
KggeHwkDTBEdRxxs7EbD/NX78JZC36dESIFBqhQJGca+lGbObaSaGy2y1AZlsiXoHo7hIa5e5g9f
Xf7y49vQ1le7eP1Gj6/ffCo3P1r7X6y/AQ==";
		    
			BeforeGetQryModel_Extend(beQryStrategyImpl);
		    
			CaseModel caseModel = beQryStrategyImpl.GetQryModel();
		    
			AfterGetQueryModel_Extend(caseModel);
		    
			QryService.SetCaseModelToSession((BaseWebForm)(this.CurrentPart), caseModel);
		}
        
        
         #endregion
         

	}
}
